package com.sunny.design.decorator.login;

/**
 * 装饰者模式最本质的特征是讲原有类的附加功能抽离出来，简化原有类的逻辑。
 * 其实抽象的装饰者是可有可无的，具体可以根据业务 模型来选择。
 *
 * @author Sunny
 * @date 2020/1/12
 */
public abstract class SignInForThirdDecorator implements ISignInService {
    private ISignInService signInService;

    protected SignInForThirdDecorator(ISignInService signInService) {
        this.signInService = signInService;
    }

    @Override
    public ResultMsg login(String username, String password) {
        return signInService.login(username, password);
    }

    @Override
    public ResultMsg register(String username, String password) {
        return signInService.register(username, password);
    }
}
